import {UserRoleNameMap} from "@/store/user";
import {i18n} from "@/i18n";
const t = i18n.global.t;


export interface MockTaskLogResult {
    logId: string
    taskCode: string
    projectId: string
    projectName: string
    handlerId: string
    handlerName: string
    name: string
    registrationTime: string
    requestInfo: any
    responseInfo: any
    requestTime: string
    timing: string
}


export interface BatchDeleteTaskLogParam {
    projectId: string
    handlerId: string
    deleteType: string
}


export enum DeleteTaskLogTypeEnums {
    MONTH_1=1,
    MONTH_3 = 2,
    MONTH_6 = 3,
    MONTH_12 = 4,
    BEFORE_1_000 = 5,
    BEFORE_10_000 = 6,
    BEFORE_30_000 = 7,
    BEFORE_100_000 = 8,
    ALL = 100,
}

export const DeleteTaskLogTypeNameMap = {
    [DeleteTaskLogTypeEnums.MONTH_1]: 'deleteTaskLogType.month_1',
    [DeleteTaskLogTypeEnums.MONTH_3]: 'deleteTaskLogType.MONTH_3',
    [DeleteTaskLogTypeEnums.MONTH_6]: 'deleteTaskLogType.MONTH_6',
    [DeleteTaskLogTypeEnums.MONTH_12]: 'deleteTaskLogType.MONTH_12',
    [DeleteTaskLogTypeEnums.BEFORE_1_000]: 'deleteTaskLogType.BEFORE_1_000',
    [DeleteTaskLogTypeEnums.BEFORE_10_000]: 'deleteTaskLogType.BEFORE_10_000',
    [DeleteTaskLogTypeEnums.BEFORE_30_000]: 'deleteTaskLogType.BEFORE_30_000',
    [DeleteTaskLogTypeEnums.BEFORE_100_000]: 'deleteTaskLogType.BEFORE_100_000',
    [DeleteTaskLogTypeEnums.ALL]: 'deleteTaskLogType.ALL',
}

export const DeleteTaskLogTypeOption = [
    { text: DeleteTaskLogTypeNameMap[DeleteTaskLogTypeEnums.MONTH_1], value: DeleteTaskLogTypeEnums.MONTH_1 },
    { text: DeleteTaskLogTypeNameMap[DeleteTaskLogTypeEnums.MONTH_3], value: DeleteTaskLogTypeEnums.MONTH_3 },
    { text: DeleteTaskLogTypeNameMap[DeleteTaskLogTypeEnums.MONTH_6], value: DeleteTaskLogTypeEnums.MONTH_6 },
    { text: DeleteTaskLogTypeNameMap[DeleteTaskLogTypeEnums.MONTH_12], value: DeleteTaskLogTypeEnums.MONTH_12 },
    { text: DeleteTaskLogTypeNameMap[DeleteTaskLogTypeEnums.BEFORE_1_000], value: DeleteTaskLogTypeEnums.BEFORE_1_000 },
    { text: DeleteTaskLogTypeNameMap[DeleteTaskLogTypeEnums.BEFORE_10_000], value: DeleteTaskLogTypeEnums.BEFORE_10_000 },
    { text: DeleteTaskLogTypeNameMap[DeleteTaskLogTypeEnums.BEFORE_30_000], value: DeleteTaskLogTypeEnums.BEFORE_30_000 },
    { text: DeleteTaskLogTypeNameMap[DeleteTaskLogTypeEnums.BEFORE_100_000], value: DeleteTaskLogTypeEnums.BEFORE_100_000 },
    { text: DeleteTaskLogTypeNameMap[DeleteTaskLogTypeEnums.ALL], value: DeleteTaskLogTypeEnums.ALL },
]

export const getDeleteTaskLogTypeName=(v)=>{
    return t(DeleteTaskLogTypeNameMap[v])
}
